<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAkbusNotifyTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('akbus_notify', function (Blueprint $table) {
            $table->id();
            $table->string('title');                              // 消息标题
            $table->text('description')->nullable();                        // 内容   
            $table->string('type')->nullable();                        // 类型 系统消息/填报提醒/审核提醒
            $table->integer('send_user_id')->nullable();   // 发送用户
            $table->integer('user_id')->nullable();   // 接收用户
            $table->string('is_read')->nullable()->default('未读');   // 是否已读 1已读 0 未读
            $table->string('is_del')->nullable()->default('未删除');   // 是否删除 1删除 0 未删除
            
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('akbus_notify');
    }
}
